package com.cyys.modules.generator.model;

import com.baomidou.mybatisplus.annotation.TableName;
import com.cyys.common.model.BaseBean;
import com.cyys.common.utils.StringUtil;
import com.cyys.modules.core.sysParam.ParamBasicUtil;
import com.cyys.modules.core.sysParam.ParamConstants;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

@Data
@TableName("generator_configure")
public class GeneratorConfigure extends BaseBean {

	private String authorName;  //作者名称

	private String packageName;  //包名称

	private String nameCaseType;  //类名转换方式:1,驼峰CamelCase;2,下划线UnderScoreCase

	private String tinyintTransType;  //typeint类型转换方式boolean,Boolean,Integer,int,String

	private String SystemTable;//系统表，不自动生成的表名，以，号隔开

	private String projectName; //工程名称

	@JsonIgnore
	public String getNameCaseTypeName() {
		if(StringUtil.isNotEmpty(nameCaseType))
			return ParamBasicUtil.getParamBasicTypeMap().get(ParamConstants.NAME_CASE_TYPE).get(nameCaseType);
		return null;
	}

	@JsonIgnore
	public String getTinyintTransTypeName() {
		if(StringUtil.isNotEmpty(tinyintTransType))
			return ParamBasicUtil.getParamBasicTypeMap().get(ParamConstants.TINYINT_TRANS_TYPE).get(tinyintTransType);
		return null;
	}

}
